export default{
  getGoods(state){
    return state.goodsList
  },
  getGoodsLength(state){
    return state.goodsList.length
  },
  getGoodsPrice(state){
    
    return state.goodsList.filter(item=>{
      // console.log('price',state);
      return item.pay
    }).reduce((pre,item)=>{
      // console.log(item);
      return item.count*item.price+pre
    },0)
  }

}
